package com.solution.framework.util;
/**
 * Created with IntelliJ IDEA.
 * Busline: sunguangzhu
 * Date: 13-6-18
 * Time: 下午1:30
 * To change this template use File | Settings | File Templates.
 */
public class Pagination {
    private boolean asc;
    private int pageSize = 20;
    private int page = 1;
    private int firstTotal;
    private int total;// 总记录数
    private int allPage;// 总页数
    private int nextPage = 1;// 下一页
    private int backPage = 1;// 上一页
    private int firstPage = 1;// 首页
    private int finalPage;// 末页
    public int getFirstTotal() {
        return firstTotal;
    }
    public void setFirstTotal(int firstTotal) {
        this.firstTotal = firstTotal;
    }
    public Pagination() {
    }
    public Pagination(int page, int pageSize) {
        this.asc = true;
        this.page = page;
        this.pageSize = pageSize;
        this.firstTotal = (this.page - 1) * pageSize;
    }
    public Pagination(boolean asc, int pageSize, int page) {
        this.asc = asc;
        this.pageSize = pageSize;
        this.page = page;
        this.firstTotal = (this.page - 1) * pageSize;
    }
    public boolean isAsc() {
        return asc;
    }
    public void setAsc(boolean asc) {
        this.asc = asc;
    }
    public int getPageSize() {
        return pageSize;
    }
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
    public int getPage() {
        return page;
    }
    public void setPage(int page) {
        this.page = page;
    }
    public int getAllPage() {
        return allPage;
    }
    public void setAllPage(int allPage) {
        this.allPage = allPage;
    }
    public int getNextPage() {
        return nextPage;
    }
    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }
    public int getBackPage() {
        return backPage;
    }
    public void setBackPage(int backPage) {
        this.backPage = backPage;
    }
    public int getFirstPage() {
        return firstPage;
    }
    public void setFirstPage(int firstPage) {
        this.firstPage = firstPage;
    }
    public int getFinalPage() {
        return finalPage;
    }
    public void setFinalPage(int finalPage) {
        this.finalPage = finalPage;
    }
} 